home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.5 KB | 49 lines | [TEXT/GEOL] |
- Item 7541918 28-June-89 06:58
-
- From: PASCOE1 Pascoe, Geoff
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: Re to Extending Object Pascal
-
- Andy,
-
- It's not clear to me how an addition to TObject is going to help you free an
- instance variable and set it to NIL.
-
- On the subject of an improved Object Pascal- I agree it can use some
- enhancements. But, I would argue that all those GROSS C++ "features" are what
- we need. For example, constructors and destructors kind of seem nice at first
- glance, but when you look under the covers its not so great. Stack allocating
- objects with constructors and destructors very tightly couples an objects
- internal implementation to the modules that use that object. If you change the
- data in the object you have to recompile all the modules that use that object
- because the amount of data allocated on the stack is going to change
- (admittedly currently this is somewhat of a problem with the current Object
- Pascal since all instance variables are visible and we use make that works on a
- file level granularity). Also, the inline code generated with constructors and
- destructors can become quite large when, for example, the number of directions
- the flow of control can take is large (e.g., in a CASE statement).
- Constructors and destructors can considerably complicate automatic storage
- management (usually called, imprecisely, Garbage Collection), assuming you feel
- that this would be useful.
- I feel that the types of improvements we make should be more toward the
- line of flexibility, more decoupling of the interface from implementation.
- Incremental garbage collection (e.g., Generational Scavenging) can be very
- efficient, some even approaching the efficiency of stack allocation. Probably
- some of the biggest improvements we could make is to decouple the languages
- implementation more from its specification. For example, why should I have to
- worry about passing instance variables as VAR parameters, or if the instance
- variable is larger than 4 bytes, I'll typically have to assign it to a
- temporary. Things like this seem to me to be implementation unduly influencing
- the language specification.
- Speaking of specifications, it would be really nice to have something a
- little more in depth than the current manual. I am continually surprised at
- the types of things the compiler does, especially when casting pointers (Did
- you know that this is potentially an active operation?)
- I guess I'll get off the soap box.
-
- Geoff
-
-
-